#ifndef L9709_SPI_DISCRETE_H
#define L9709_SPI_DISCRETE_H
/*****************************************************************************
* Copyright 2020 LinControl, Inc., All Rights Reserved
* LinControl Confidential
*
*
*
* Module Name:  L9709_spi_discrete.h
*
* Description:
*       This file contains L9709_spi_discrete definitions
*
*
* ChangeLog:
*   Name:      Date:       ChangeContent:
*   wangxiao   20200827    Create this file
******************************************************************************/
#include "dio_type.h"


typedef enum
{
    L9709_ETPU_CHANNEL_POSITION                      = 0, //bit[0:2]
    L9709_ETPU_MODE_POSITION                         = 3  //bit[3:4]
} L9709_ETPU_CFG_POS_EM;

typedef enum
{
    L9709_ETPU_CHANNEL_WIDTH                         = 3, //bit[0:2]
    L9709_ETPU_MODE_WIDTH                            = 2  //bit[3:4]
} L9709_ETPU_CFG_WIDTH_EM;


typedef enum
{
    L9709_ETPU_CHANNEL_1,
    L9709_ETPU_CHANNEL_2,
    L9709_ETPU_CHANNEL_3,
    L9709_ETPU_CHANNEL_4,
    L9709_ETPU_CHANNEL_5,
    L9709_ETPU_CHANNEL_6,
    L9709_ETPU_CHANNEL_MAX
} L9709_ETPU_Channel_EM;

typedef enum
{
    L9709_ETPU_MODE_INJECT,
    L9709_ETPU_MODE_HEATER,
    L9709_ETPU_MODE_IGNITION,
    L9709_ETPU_MODE_MAX
} L9709_ETPU_Mode_EM;

typedef enum
{
   L9709_INACTIVE,
   L9709_ACTIVE
}  L9709_INIT_STATE_EM;

typedef enum
{
   L9709_LOW_ACTIVE,
   L9709_HIGH_ACTIVE
}  L9709_ACTIVE_STATE_EM;

extern void L9709_DISCRETE_Device_Initialize(uint32_t in_cfg);
extern bool L9709_DISCRETE_GetFault(uint32_t in_cfg , uint8_t in_type);
extern void L9709_DISCRETE_ClearFaultLog(uint32_t in_cfg , uint8_t in_type);
extern bool L9709_DISCRETE_GetTestStatus(uint32_t in_cfg,uint8_t in_type);
extern bool L9709_DISCRETE_GetFaultFlag(uint32_t in_cfg);

#endif /* End of L9709_SPI_DISCRETE_H */
